/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/idenger">idenger</a> All rights reserved.
 */
package com.idenger.modules.edu.service.course;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.idenger.common.persistence.Page;
import com.idenger.common.service.CrudService;
import com.idenger.modules.edu.entity.course.EduVideoHistory;
import com.idenger.modules.edu.dao.course.EduVideoHistoryDao;

/**
 * 视频历史Service
 * @author 视频历史
 * @version 2017-12-13
 */
@Service
@Transactional(readOnly = true)
public class EduVideoHistoryService extends CrudService<EduVideoHistoryDao, EduVideoHistory> {

	public EduVideoHistory get(String id) {
		return super.get(id);
	}
	
	public List<EduVideoHistory> findList(EduVideoHistory eduVideoHistory) {
		return super.findList(eduVideoHistory);
	}
	public List<EduVideoHistory> findByUserIdAndcourseContentId(EduVideoHistory eduVideoHistory) {
		return dao.findByUserIdAndcourseContentId(eduVideoHistory);
	}


	public Page<EduVideoHistory> findPage(Page<EduVideoHistory> page, EduVideoHistory eduVideoHistory) {
		return super.findPage(page, eduVideoHistory);
	}
	
	@Transactional(readOnly = false)
	public void save(EduVideoHistory eduVideoHistory) {
		super.save(eduVideoHistory);
	}
	
	@Transactional(readOnly = false)
	public void delete(EduVideoHistory eduVideoHistory) {
		super.delete(eduVideoHistory);
	}
	
	@Transactional(readOnly = false)
	public void updateHistoryForUserId(String updUserId,String userId){
		dao.updateHistoryForUserId(updUserId, userId);
	}
	
}